home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 4 (Reseller) / Apple Ref. & Pres. Lib.v4.0.iso / 6-Apple⁄DEC Alliance / Solutions & Networking Guide / Macintosh Networking Guide / Macintosh Networking Guide / background_6780.txt < prev    next >
Text File  |  1990-04-17  |  9KB  |  330 lines

  1. -- background: 6780 from stack: in
  2. -- bmap block id: 7496
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Intro
  6. ----- HyperTalk script -----
  7. --‚Ä¢This animates the icons to show connectivity between CPU's, JONATHAN.
  8. on INTRO
  9.   set lockscreen to true
  10.   global sol,env,environments,envnum,solutions, solnum,Animate
  11.   show cd field "Continue"
  12.   show cd fld "Showsol"
  13.   show cd fld "Showenv"
  14.   set cursor to busy
  15.   if the mouseClick is True then EndIntro
  16.   show --‚Ä¢To get ENVironments & SOLutions list ready
  17.   if the mouseClick is True then EndIntro
  18.   set cursor to none
  19.   unlock screen
  20.   MF3
  21.   animate3
  22.   repeat forever --prevents halting in mid execution of a script-TT
  23.     EnvTally  --‚Ä¢Shows Environment names
  24.     if the mouseClick is True then exit repeat
  25.     Animate2  --‚Ä¢CPU hilight
  26.     if the mouseClick is True then exit repeat
  27.     SolTally2 --‚Ä¢Shows Solution names
  28.     if the mouseClick is True then exit repeat
  29.     do Animate
  30.     if the mouseClick is True then exit repeat
  31.     EnvTally2
  32.     if the mouseClick is True then exit repeat
  33.     Animate2
  34.     if the mouseClick is True then exit repeat
  35.     EnvTally
  36.     if the mouseClick is True then exit repeat
  37.     animate4
  38.     if the mouseClick is True then exit repeat
  39.     SolTally
  40.     if the mouseClick is True then exit repeat
  41.     animate2
  42.     if the mouseClick is True then exit repeat
  43.     Animate3
  44.     if the mouseClick is True then exit repeat
  45.     EnvTally
  46.     if the mouseClick is True then exit repeat
  47.     do animate
  48.     if the mouseClick is True then exit repeat
  49.     SolTally
  50.     if the mouseClick is True then exit repeat
  51.     animate2
  52.   end repeat
  53.   EndIntro
  54. end INTRO
  55.  
  56. on EndIntro
  57.   global Animate
  58.   set lockscreen to true
  59.   put empty into Animate
  60.   changeCurs 69
  61.   go to cd "Briefing room"
  62.   unlock screen with dissolve slowly
  63. end EndIntro
  64.  
  65. --‚Ä¢ For showing and moving SOLUTION fields
  66. on SolTally
  67.   global environments,Solutions,SolNum,Animate,SolX,SolLoc
  68.   set lockscreen to true
  69.   put 1 into SolX
  70.   get random (5)
  71.   --if it is 1 then put "325,211" into SolLoc
  72.   --if it is 2 then put "325,73" into SolLoc
  73.   --if it is 3 then put "310,210" into SolLoc
  74.   --if it is 4 then put "187,66" into SolLoc
  75.   --if it is 5 then put "160,96" into SolLoc
  76.   if it is 5 then put "5" into SolX
  77.   --set the location of card field "ShowSol" to SolLoc
  78.   get random(solnum)
  79.   put line it of solutions into sol
  80.   if SolX is "5" then put "Business" into Sol
  81.   put sol into cd fld "Showsol"
  82.   show cd fld "Showsol"
  83.   unlock screen with dissolve very fast
  84. end SolTally
  85.  
  86. on SolTally2
  87.   global environments,Solutions,SolNum,Animate,SolX,SolLoc
  88.   set lockscreen to true
  89.   get random (4)
  90.   get random(solnum)
  91.   put line it of solutions into sol
  92.   put sol into cd fld "Showsol"
  93.   show cd fld "Showsol"
  94.   unlock screen with dissolve very fast
  95. end SolTally2
  96.  
  97. --‚Ä¢ For showing and moving ENVIRONMENT fields
  98. on EnvTally
  99.   global environments,Solutions,SolNum,Animate,EnvX,EnvLoc
  100.   set lockscreen to true
  101.   put 1 into EnvX
  102.   get random (5)
  103.   if it is 5 then put "5" into EnvX
  104.   put line it of environments into env
  105.   if EnvX is "5" then put "Macintosh" into env
  106.   put env into cd fld "Showenv"
  107.   show cd fld "Showenv"
  108.   unlock screen with dissolve fast
  109. end EnvTally
  110.  
  111. on EnvTally2
  112.   global environments,Solutions,SolNum,Animate,EnvX,EnvLoc
  113.   set lockscreen to true
  114.   get random (4)
  115.   put line it of environments into env
  116.   put env into cd fld "Showenv"
  117.   show cd fld "Showenv"
  118.   unlock screen with dissolve very fast
  119. end EnvTally2
  120.  
  121. --‚Ä¢Repeats the CPU hilite twice
  122. on Animate2
  123.   global environments,Solutions,SolNum,Animate
  124.   repeat 2
  125.     --‚Ä¢ For the CPUs to hilite,JON
  126.     get random (9)
  127.     if it is 1 then put "CX" into Animate
  128.     if it is 2 then put "X" into Animate
  129.     if it is 3 then put "SE" into Animate
  130.     if it is 4 then put "PC" into Animate
  131.     if it is 6 then put "PC2" into Animate
  132.     if it is 7 then put "MF" into Animate
  133.     if it is 8 then put "MF2" into Animate
  134.     if it is 9 then put "MF3" into Animate
  135.     do animate
  136.   end repeat
  137. end Animate2
  138.  
  139. on Animate3
  140.   global Animate
  141.   repeat 3
  142.     get random (9)
  143.     if it is 1 then put "CX" into Animate
  144.     if it is 2 then put "X" into Animate
  145.     if it is 3 then put "SE" into Animate
  146.     if it is 4 then put "PC" into Animate
  147.     --if it is 5 then put "SE2" into Animate
  148.     if it is 6 then put "PC2" into Animate
  149.     if it is 7 then put "MF" into Animate
  150.     if it is 8 then put "MF2" into Animate
  151.     if it is 9 then put "MF3" into Animate
  152.     do animate
  153.   end repeat
  154. end Animate3
  155.  
  156. on Animate4
  157.   global Animate
  158.   repeat 4
  159.     get random (9)
  160.     if it is 1 then put "CX" into Animate
  161.     if it is 2 then put "X" into Animate
  162.     if it is 3 then put "SE" into Animate
  163.     if it is 4 then put "PC" into Animate
  164.     --if it is 5 then put "SE2" into Animate
  165.     if it is 6 then put "PC2" into Animate
  166.     if it is 7 then put "MF" into Animate
  167.     if it is 8 then put "MF2" into Animate
  168.     if it is 9 then put "MF3" into Animate
  169.     do animate
  170.   end repeat
  171. end Animate4
  172.  
  173. --‚Ä¢Following scripts hilite individual CPU icons, JONATHAN.
  174. ON X
  175.   global Animate
  176.   if Animate is empty then exit X
  177.   set the icon of cd button "X" to "X1"
  178.   wait 2
  179.   set the icon of cd button "X" to "X2"
  180.   wait 2
  181.   set the icon of cd button "X" to "X3"
  182.   wait 2
  183.   set the icon of cd button "X" to "X2"
  184.   wait 2
  185.   set the icon of cd button "X" to "X1"
  186. END X
  187.  
  188. ON MF3
  189.   global Animate
  190.   if Animate is empty then exit MF3
  191.   set the icon of cd button "MF" to "MF2"
  192.   wait 2
  193.   set the icon of cd button "MF" to "MF1"
  194.   wait 2
  195.   set the icon of cd button "MF" to "MF2"
  196.   wait 2
  197.   set the icon of cd button "MF" to "MF1"
  198.   wait 2
  199.   set the icon of cd button "MF" to "MF3"
  200.   wait 2
  201.   set the icon of cd button "MF" to "MF4"
  202.   wait 2
  203.   set the icon of cd button "MF" to "MF1"
  204. END MF3
  205.  
  206.  
  207. ON MF2
  208.   global Animate
  209.   if Animate is empty then exit MF2
  210.   set the icon of cd button "MF" to "MF5"
  211.   wait 2
  212.   set the icon of cd button "MF" to "MF1"
  213.   wait 2
  214.   set the icon of cd button "MF" to "MF4"
  215.   wait 2
  216.   set the icon of cd button "MF" to "MF1"
  217.   wait 2
  218.   set the icon of cd button "MF" to "MF3"
  219.   wait 2
  220.   set the icon of cd button "MF" to "MF2"
  221.   wait 2
  222.   set the icon of cd button "MF" to "MF1"
  223. END MF2
  224.  
  225. ON MF
  226.   global Animate
  227.   if Animate is empty then exit MF
  228.   set the icon of cd button "MF" to "MF2"
  229.   wait 2
  230.   set the icon of cd button "MF" to "MF1"
  231.   wait 2
  232.   set the icon of cd button "MF" to "MF2"
  233.   wait 2
  234.   set the icon of cd button "MF" to "MF5"
  235.   wait 2
  236.   set the icon of cd button "MF" to "MF4"
  237.   wait 2
  238.   set the icon of cd button "MF" to "MF3"
  239.   wait 2
  240.   set the icon of cd button "MF" to "MF2"
  241.   wait 2
  242.   set the icon of cd button "MF" to "MF1"
  243. END MF
  244.  
  245. ON SE
  246.   global Animate
  247.   if Animate is empty then exit SE
  248.   global sol,env,environments,envnum,solutions, solnum
  249.   set the icon of cd button "SE" to "SE1"
  250.   wait 2
  251.   set the icon of cd button "SE" to "SE2"
  252.   wait 2
  253.   set the icon of cd button "SE" to "SE3"
  254.   wait 2
  255.   set the icon of cd button "SE" to "SE2"
  256.   wait 2
  257.   set the icon of cd button "SE" to "SE1"
  258. END SE
  259.  
  260. ON PC
  261.   global Animate
  262.   if Animate is empty then exit PC
  263.   set the icon of cd button "PC" to "PC1"
  264.   wait 2
  265.   set the icon of cd button "PC" to "PC2"
  266.   wait 2
  267.   set the icon of cd button "PC" to "PC3"
  268.   wait 2
  269.   set the icon of cd button "PC" to "PC2"
  270.   wait 2
  271.   set the icon of cd button "PC" to "PC1"
  272. END PC
  273.  
  274. ON SE2
  275.   global Animate
  276.   if Animate is empty then exit SE2
  277.   set the icon of cd button "SE2" to "SE1"
  278.   wait 2
  279.   set the icon of cd button "SE2" to "SE2"
  280.   wait 2
  281.   set the icon of cd button "SE2" to "SE3"
  282.   wait 2
  283.   set the icon of cd button "SE2" to "SE2"
  284.   wait 2
  285.   set the icon of cd button "SE2" to "SE1"
  286. END SE2
  287.  
  288. ON PC2
  289.   global Animate
  290.   if Animate is empty then exit PC2
  291.   set the icon of cd button "PC2" to "PC1"
  292.   wait 2
  293.   set the icon of cd button "PC2" to "PC2"
  294.   wait 2
  295.   set the icon of cd button "PC2" to "PC3"
  296.   wait 2
  297.   set the icon of cd button "PC2" to "PC2"
  298.   wait 2
  299.   set the icon of cd button "PC2" to "PC1"
  300. END PC2
  301.  
  302. ON CX
  303.   global Animate
  304.   if Animate is empty then exit CX
  305.   set the icon of cd button "CX" to "CX1"
  306.   wait 2
  307.   set the icon of cd button "CX" to "CX2"
  308.   wait 2
  309.   set the icon of cd button "CX" to "CX3"
  310.   wait 2
  311.   set the icon of cd button "CX" to "CX2"
  312.   wait 2
  313.   set the icon of cd button "CX" to "CX1"
  314. END CX
  315.  
  316. on show
  317.   global sol,env,environments,envnum,solutions,solnum
  318.   put field "Vertical" of cd "Mac Grid" into solutions
  319.   put the number of lines of solutions into solnum
  320.   put field "Horizontal" of cd "Mac Grid" into environments
  321.   get the number of lines of environments
  322.   repeat with i =1 to it
  323.     if the mouseClick is True then exit show
  324.     if line i of environments is "Mac" then put "Macintosh" into line i of environments
  325.   end repeat
  326.   put it into envnum
  327. end show
  328.  
  329.  
  330.